# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=gnome-books
pkgver=3.34.0
pkgrel=9
pkgdesc="GNOME Ebook Manager"
url="https://wiki.gnome.org/Apps/Books"
arch="all !s390x !mips !mips64" # missing gjs, librsvg
license="LGPL-2.0-or-later"
depends="gsettings-desktop-schemas libgepub tracker-miners"
makedepends="meson gjs-dev evince-dev gnome-desktop-dev gtk+3.0-dev glib-dev
	gobject-introspection-dev tracker-dev webkit2gtk-dev libgepub-dev librsvg"
checkdepends="appstream-glib desktop-file-utils"
# Don't conflict with other packages doing a shared link of libgd
sonameprefix="$pkgname:"
subpackages="$pkgname-lang $pkgname-doc"
source="https://download.gnome.org/sources/gnome-books/${pkgver%.*}/gnome-books-$pkgver.tar.xz
	504b66f6cec4b7a7bb46ca7a3b27a47ffb6a424b.patch"

build() {
	meson \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--buildtype=plain \
		. output
	ninja -C output
}

check() {
	ninja -C output test
}

package() {
	DESTDIR="$pkgdir" ninja -C output install
}

sha512sums="634dcd7e26ede955e8700335fcd04ab4bd40d083d251846f66a46dac49b7525e011b31de0b60585ed643d04798e472f4fbd69c872cdeed7fa36bcc445ff03016  gnome-books-3.34.0.tar.xz
c8f2a22cd2226d531cb9a39edab133444583647f1e2ab940de08d05bb1816ad356229164a2adac10bb5f02ef663f7124b211f2cfb00670a148f396c075d02222  504b66f6cec4b7a7bb46ca7a3b27a47ffb6a424b.patch"
